﻿// (c) Copyright Fernando Cerqueira.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System.ComponentModel;
using Microsoft.Windows.Design;
using Microsoft.Windows.Design.Metadata;

namespace DevPhone.Controls.Design
{
    class DateTimePickerBaseMetadata : AttributeTableBuilder
    {
        public DateTimePickerBaseMetadata()
        {
            AddCustomAttributes(typeof(DateTimePickerBase), new ToolboxBrowsableAttribute(false));

            AddCustomAttributes(typeof(DateTimePickerBase), "HeaderBox", new CategoryAttribute(MetadataStore.DateTimePickerProperties));
            AddCustomAttributes(typeof(DateTimePickerBase), "HeaderBox", new DescriptionAttribute("Gets or sets the header of Windowsbox the control."));

            AddCustomAttributes(typeof(DateTimePickerBase), "Value", new CategoryAttribute(MetadataStore.DateTimePickerProperties));
            AddCustomAttributes(typeof(DateTimePickerBase), "Value", new DescriptionAttribute("Gets or sets the DateTime value."));

            AddCustomAttributes(typeof(DateTimePickerBase), "ValueStringFormat", new CategoryAttribute(MetadataStore.DateTimePickerProperties));
            AddCustomAttributes(typeof(DateTimePickerBase), "ValueStringFormat", new DescriptionAttribute("Gets or sets the format string to use when converting the Value property to a string."));

            AddCustomAttributes(typeof(DateTimePickerBase), "ValueChanged", new DescriptionAttribute("Event that is invoked when the Value property changes."));

            AddCustomAttributes(typeof(DateTimePickerBase), "TryTransformValueString", new CategoryAttribute(MetadataStore.DateTimePickerProperties));
            AddCustomAttributes(typeof(DateTimePickerBase), "TryTransformValueString", new DescriptionAttribute("Gets or sets the Try Transformtion ValueString."));
        }
    }
}
